Question 1
Distinguish between a prime and a composite integer.
Specify the prime and composite integers in the range from 1 to 30 by using Sieve of Eratosthenes method.
Write down a list of numbers:
Start with a list of all natural numbers from 2 up to the limit you want to find primes for.
Mark 2 as prime:
The first prime number is 2.
Cross out multiples of 2:
Cross out all multiples of 2 except for 2 itself (4, 6, 8, etc.).
Find the next unmarked number:
The next unmarked number is 3.
Mark it as prime:
3 is the next prime number.
Cross out multiples of 3:
Cross out all multiples of 3 except for 3 itself (9, 12, 15, etc.).
Repeat:
Continue this process, finding the next unmarked number, marking it as prime, and crossing out its multiples, until you reach the square root of your limit.
Remaining numbers are prime:
The numbers that remain unmarked are prime numbers.
Question 2
Determine whether the following integers are primes or composite.
a) 271 b) 501 c) 831
d) 1479 e) 3513 f) 6487
a) √271 ≈ 16.4.
By dividing 271 with all the primes less than 16, that are 2, 3, 5, 7, 11, and 13, we found that they are indivisible to 271.
Hence 271 is a prime.
b) √501 ≈ 22.4.
By dividing 501 with all the primes less than 22, that are 2, 3, 5, 7, 11, 13, 17, and 19, we found that 3 divides 501, 501 = 3 x 167.
Hence 501 is not a prime.
c) √831 ≈ 28.8.
By dividing 831 with all the primes less than 28, that are 2, 3, 5, 7, 11, 13, 17, 19, and 23, we found that 3 divides 831, 831 = 3 x 277.
Hence 831 is not a prime.
d) √1479 ≈ 38.4.
By dividing 1479 with all the primes less than 38, that are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, and 37, we found that 3 divides 1479, 1479 = 3 x 493.
Hence 1479 is not a prime.
e) √3513 ≈ 59.2.
By dividing 3513 with all the primes less than 59, that are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, and 53, we found that 3 divides 3513, 3513 = 3 x 1171.
Hence 3513 is not a prime.
f) √6487 ≈ 80.5.
By dividing 6487 with all the primes less than 80, that are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, and 79, we found that they are indivisible to 6487.
Hence 6487 is a prime.
Question 3
Solve the following problem using the approximation method of calculating n (upper limit discovered by Gauss and lower limit discovered by Legendre).
Find the number of primes is between 100,000 and 200,000.
Find the number of composite integers is between 100,000 and 200,000.
What is the ratio of primes to composites in the above range.
Question 4
Question 5
Question 6
Question 7
Question 8